import http from '@http/http'

// 得到后端全部内容
export const getAllVio = obj => http.GET('/api/violations/getAll', obj)

export const getAllVioNot = obj => http.GET('/api/violations/getAll2', obj)

export const getAllAdm = obj => http.GET('/api/admins/getAll', obj)

export const createAdm = obj => http.POST('/api/admins/insert', obj)

export const createVio = obj => http.POST('/api/violations/insert', obj)

export const updateAdm = obj => http.POST('/api/admins/update', obj)

export const deleteAdm = obj => http.POST('/api/admins/delete', obj)

export const selectAdm = obj => http.POST('/api/admins/select', obj)

export const getAllNumber = obj => http.GET('/api/violations/getNumber', obj)

export const getAllNumberByTimeRange = obj => http.POST('/api/violations/getNumberByTimeRange', obj)

export const getAllLogs = obj => http.GET('/api/logs/getAll', obj)

export const selectLogs = obj => http.POST('/api/logs/select', obj)

export const importVio = obj => http.POST('api/violations/importViolations', obj)

export const lengthen = obj => http.POST('api/violations/extendViolations', obj)

export const deleteVio = obj => http.POST('api/violations/deleteViolations', obj)

export const TypeVio = obj => http.GET('api/violations/getAllCategory', obj)

export const NumVio = obj => http.GET('api/violations/getAllCategoryNum', obj)
